﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace NeuralStock.Common
{    
    public static class DirectoryRepository
    {
        public static string BaseDirectory = @"D:\GamblerFiles"; 

        public static string BaseImportDirectory = Path.Combine(BaseDirectory, "ImportData");

        public static string MacroDataDirectory = Path.Combine(BaseImportDirectory, "MacroData");

        public static string IndexDataDirectory = Path.Combine(BaseImportDirectory, "IndexData");

        public static string BossaDataDirectory = Path.Combine(BaseImportDirectory, "BossaData");

        public static string MoneyDataDirectory = Path.Combine(BaseImportDirectory, "MoneyData");

        public static string WebDataDirectory = Path.Combine(BaseImportDirectory, "WebData");

        public static string GpwQuotesDirectory = Path.Combine(BaseImportDirectory, "GpwQuotes");

        public static string BaseOutputDirectory = Path.Combine(BaseDirectory, "Output");

        public static string GamblerOutputDirectory = Path.Combine(BaseOutputDirectory, "Gambler");

        public static void Initialize()
        {
            if (!Directory.Exists(BaseDirectory))
            {
                Directory.CreateDirectory(BaseDirectory);
            }
            if (!Directory.Exists(BaseImportDirectory))
            {
                Directory.CreateDirectory(BaseImportDirectory);
            }
            if (!Directory.Exists(BaseOutputDirectory))
            {
                Directory.CreateDirectory(BaseOutputDirectory);
            }
            if (!Directory.Exists(MacroDataDirectory))
            {
                Directory.CreateDirectory(MacroDataDirectory);
            }
            if (!Directory.Exists(IndexDataDirectory))
            {
                Directory.CreateDirectory(IndexDataDirectory);
            }
            if (!Directory.Exists(BossaDataDirectory))
            {
                Directory.CreateDirectory(BossaDataDirectory);
            }
            if (!Directory.Exists(MoneyDataDirectory))
            {
                Directory.CreateDirectory(MoneyDataDirectory);
            }
            if (!Directory.Exists(GamblerOutputDirectory))
            {
                Directory.CreateDirectory(GamblerOutputDirectory);
            }
            if (!Directory.Exists(WebDataDirectory))
            {
                Directory.CreateDirectory(WebDataDirectory);
            }
            if (!Directory.Exists(GpwQuotesDirectory))
            {
                Directory.CreateDirectory(GpwQuotesDirectory);
            }
        }
    }
}
